PATH 
Mac OS 8 and 9 Developer Documentation > Text and Other International Services > Apple Type Services for Unicode Imaging (ATSUI) > Apple Type Services for Unicode Imaging Reference

     

ATSUCustomFreeFunc

Defines a pointer to your memory deallocation callback function. Your callback function manages memory deallocation operations typically handled by ATSUI.

typedef void (*ATSUCustomFreeFunc )(void *refCon, void *doomedBlock); You would declare your function like this if you were to name it MyATSUCustomFreeFunc:

void MyATSUCustomFreeFunc (
                     void *refCon,
                     void *doomedBlock);
refCon
A pointer to arbitrary data for use in your memory deallocation callback function. ATSUI passes a pointer to data that your application previously supplied in the memoryRefCon field of the ATSUMemoryCallbacks union.

doomedBlock
A pointer to the beginning of the block of memory that your callback function will deallocate.

function result
The address of the block of memory freed by your MyATSUCustomFreeFunc function.
DISCUSSION
You can register your callback function by calling the function ATSUCreateMemorySetting and passing the constant kATSUUseCallbacks in iHeapSpec and a pointer to the ATSUMemoryCallbacks union in iMemoryCallbacks. You then supply a pointer of type ATSUCustomFreeFunc in the Free field of the callbacks structure of the ATSUMemoryCallbacks union.

VERSION NOTES
Available beginning with ATSUI 1.1.


© 2000 Apple Computer, Inc. – (Last Updated 25 Jan 00)